<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ page import="jman.service.UserService" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="java.util.List" %>
<%@ page import="jman.mode.User" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>发起新的投票</title>
</head>
<body>
<h2>发起新的投票</h2>
<%
List<User> userList=new ArrayList<User>();
UserService us=new UserService();
userList=us.getAllStudents();
%>
<form action="CreateVote">
投票标题：<input type="text" name="title">
<br><br>
推荐的学生：
<br>
<%
for(int i=0;i<userList.size();++i){
%>
<input type="checkbox" name="user_id1" value=<%=userList.get(i).getId() %>><%=userList.get(i).getName() %>(ID：<%=userList.get(i).getId() %>)
<br>
<%
}
%>
<br>
允许参加投票的学生：
<br>
<%
for(int i=0;i<userList.size();++i){
%>
<input type="checkbox" name="user_id2" value=<%=userList.get(i).getId() %>><%=userList.get(i).getName() %>(ID：<%=userList.get(i).getId() %>)
<br>
<%
}
%>
<br>
<input type="submit" value="发起投票">
</form>
</body>
</html>